<%= error_messages_for 'project' %>
<table class="tablev">
	<tr>
		<th>name</th>
		<td><%= text_field 'project', 'name' %></td>
	</tr>
	<tr>
		<th>Ticket Categories</th>
		<td>
			<% for category in Category.find(:all) -%>
			<%= "<input id=\"categories_#{category.id}\" type=\"checkbox\" name=\"categories[]\" value=\"#{category.id}\" checked=\"checked\" /> " if @project.categories.include? category %>
		    <%= "<input id=\"categories_#{category.id}\" type=\"checkbox\" name=\"categories[]\" value=\"#{category.id}\" /> " unless @project.categories.include? category %>
		    <%= "<label for=\"categories_#{category.id}\">#{category.name.titleize}</label><br /> " %>
			
			<% end -%>
		</td>
	</tr>
</table>